Manually Backup and Restore Apis Foundation configuration

Current version is 64 bit only, but we include this to show how to upgrade from legacy 32-bit to 64-bit.

A secure method to copy Apis Hive configuration from one computer to another, or simply have a backup of the configuration, is to copy the configuration files and registry settings. By using this method, copying and restore of configurations can be automated by scripting.

This method requires basic knowledge to Windows registry settings, how to export and import Windows registry keys.

The configuration location

The procedure varies slightly depending on the bitness (32/64) of the operating system and Apis Foundation. There are mainly 3 configuration storage types; registry, binary files and xml configuration files.

The location of registry Apis configuration

The registry holds information regarding basic functionality of ApisHive, HoneyStore and configuration file location of module configuration.

  • The location of registry Apis configuration:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor
  • 32-bit application on 64-bit operating system:
    • HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Prediktor

Apis module configuration files

These files hold information regarding module property, and items, default the file name is the same as the module/database name:

  • <ModuleName>.acd Module binary configuration file (old format)
  • <ModuleName>.ans Module binary configuration file
  • <DatabaseName>.acdb Database binary configuration file (old format)
  • <DatabaseName>.ansdb Database binary configuration file

The default location of Apis module configuration:

  • <Install Directory>\Config\<INSTANCENAME> Module configuration files
  • <Install Directory>\Config\ApisHoneyStore Database configuration files

Event Historian

If Event Historian (Chronical) is enabled the configuration is stored by default in

<Install Directory>\Chronical\<INSTANCENAME>

Apis servers xml configuration files

These files hold information regarding advanced functionality of ApisHive and HoneyStore not found in the registry.

64-bit Apis Foundation

  • <Install Directory>\Bin
    • ApisHoneystore.exe.config
    • ApisHoneystore.AppSettings.config

32-bit Apis Foundation:

  • <Install Directory>\Bin
    • ApisHive.exe.config (deprecated)
    • ApisHive.AppSettings.config (deprecated)
    • ApisHoneystore.exe.config
    • ApisHoneystore.AppSettings.config

Upgrade paths

From Operating system bitnessTo Operating system bitnessFrom Apis Foundation bitnessTo Apis Foundation bitnessCopy procedureRestore procedure
32643264C1R6
64643264C2R8
64646464C3R9

Copy Apis Hive configuration

  1. Copy 32-bit Apis Hive configuration on 32-bit operating system

    1. Copy all files from <Install Directory>\Config and if Event Historian (Chronical) is enabled copy all files from <Install Directory>\Chronical\<INSTANCENAME>
    2. Export the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\<INSTANCENAME> to a file.
  2. Copy 32-bit Apis Hive configuration on 64-bits-bit operating system

    1. Copy all files from <Install Directory>\Config and if Event Historian (Chronical) is enabled copy all files from <Install Directory>\Chronical\<INSTANCENAME>
    2. Export the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Prediktor\Apis\< INSTANCENAME > to a file.
  3. Copy 64-bit Apis Hive configuration

    1. Copy all files from <Install Directory>\Config and if Event Historian (Chronical) is enabled copy all files from <Install Directory>\Chronical\<INSTANCENAME>
    2. Export the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\<INSTANCENAME> to a file.

Restore Apis Hive configuration

If the <Install Directory> directory on the destination computer is different from the source computer, the registry settings export file must be changed:

In the exported registry script file, locate where Apis Hive configuration was initially installed the "ApisStorageSource" string value, for instance where system was initially installed in C:\\Program Files (x86)\APIS and is copied/ moved to C:\\Program Files\APIS :

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Prediktor\Apis\ApisHive\Modules\ApisWorker]

@="{983B4AE2-ABB9-11D2-9424-00608CF4C421}"

"ProgIDOfModule"="Prediktor.ApisWorker.1"

"ApisStorageClass"="{4C854C93-C667-11D2-944B-00608CF4C421}"

"ApisStorageSource"=" C:\Program Files (x86)\APIS\ Config\ApisHive\Worker.ans "

Replace all occurrences of the original location to new location, for instance:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Prediktor\Apis\ApisHive\Modules\ApisWorker]

@="{983B4AE2-ABB9-11D2-9424-00608CF4C421}"

"ProgIDOfModule"="Prediktor.ApisWorker.1"

"ApisStorageClass"="{4C854C93-C667-11D2-944B-00608CF4C421}"

""ApisStorageSource"="C:\Program Files\APIS\Config\ApisHive\Worker.ans "

  1. Restore 32-bit Apis Hive configuration from 32-bit operating system to 64-bit bits operating system as 64-bit Apis Hive configuration.

    1. Install Apis Foundation 64
    2. Create new instance if not using default.
    3. Copy all files (restore) (1.a) to <Install Directory>\Config and possibly <Install Directory>\Chronical\<INSTANCENAME>
      1. Run registry script. (1.c)
        1. Install Apis Foundation
        2. Create new instance if not using default.
        3. Copy all files (restore) (1.a) to <Install Directory>\Config , (possibly <Install Directory>\Chronical\<INSTANCENAME>) and the “.config” (1.b) files to <Install Directory>\Bin
        4. Run registry script. (1.c)
  2. Restore 32-bit Apis Hive configuration from 64-bit operating system to 64-bit bits operating system as 64-bit Apis Hive configuration.

    1. Install Apis Foundation 64
    2. Create new instance if not using default.
    3. Copy all files (restore) (2.a) to <Install Directory>\Config and possibly <Install Directory>\Chronical\<INSTANCENAME>
    4. Edit the registry script (2.c)
      1. Replace all “SOFTWARE\Wow6432Node\Prediktor” with “SOFTWARE\Prediktor”
      2. Save
    5. Run the modified registry script.
  3. Restore 64-bit Apis Hive configuration from 64-bit operating system to 64-bit operating system as 64-bit Apis Hive configuration.

    1. Install Apis Foundation 64
    2. Create new instance if not using default.
    3. Copy (restore) all files (3.a) to <Install Directory>\Config, (possibly <Install Directory>\Chronical\<INSTANCENAME>) and the “.config” files (3.b) to <Install Directory>\Bin64
    4. Run registry script. (3.c)

Manually copy / move Apis Honey Store database

A secure bulletproof method to copy Apis Honeystore data from one computer to another, or simply take backup/copy of the configuration, the disadvantage is that the database must be taken offline.

Example; common user case:

Migration of ApisFoundation to new hardware from Server1 to Server2

  • Assume we have database named “RedLogger” this is located in C:\APIS\DBs on Server1
  • Assume ApisFoundation is installed in same location on both computers C:\APIS

During migration to Server2 we want to move the location of the “RedLogger” database, to E:\DBs

  • Assure ApisHoneyStore service is stopped on Server1 and 2
  • Copy C:\APIS\Config\ApisHoneyStore\RedLogger.ansb from Server1 to C:\APIS\Config\ApisHoneyStore on Server2
  • Copy the RedLogger.dat and RedLogger.cache files from C:\APIS\DBs on Server1 to E:\DBs on Server2
  • On Server1 export the registry key:
  • ”HKEY_LOCAL_MACHINE\SOFTWARE\Prediktor\Apis\ApisHoneyStore\Databases\RedLogger” to a file
  • Copy the registry script file to Server2 and run it. (If ApisFoundation is installed in different location than Server1 the “ConfigFile” String Value in the registry script must be altered.)
  • Assure you have a backup of the file C:\APIS\Config\ApisHoneyStore\RedLogger.ansb
  • Edit the location of the database in the configuration file, there are two options (tools); offline ApisMetaStorageViewer and online MMC Snapin:
  1. Offline:
    •  Start ApisMetaStorageViewer.exe (is a part of APIS_x_x_x-Tools)

      • Open the C:\APIS\Config\ApisHoneyStore\RedLogger.ansb

      • Change the Attrib ID 20 from C:\APIS\DBs\ to E:\DBs
      • The migration of the database is now finished and ApisHoneyStore can be started on Server2
  2. Online:
  •   Start ApisHoneyStore service

    • Open the ApisHoneyStore MMC snapin
    • Navigate to RedLogger database right click and select Administer database…

    • In RedLogger properties dialog change DataDirPath from C:\APIS\DBs\RedLogger.dat\ to E:\DBs\RedLogger.dat\ and CachePath from C:\APIS\DBs\ to E:\DBs

    • The migration of the database is now finished